<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>公司信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
        $(document).ready(function() {
            $("#value").focus();
            $("#inputForm").validate({
                submitHandler: function(form){
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function(error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });
        });
	</script>
</head>
<body>
<ul class="nav nav-tabs">
	<li><a href="${ctx}/business/companyinfo/look">公司信息查看</a></li>
	<li class="active"><a href="${ctx}/business/companyinfo?id=${companyinfo.id}">公司信息修改</a></li>
</ul><br/>
<form:form id="inputForm" modelAttribute="companyInfo" action="${ctx}/business/companyinfo/save" method="post" class="form-horizontal">
	<form:hidden path="id"/>
	<tags:message content="${message}"/>
	  <div class="control-group">
      	<label class="control-label">公司名称:</label>
      	<div class="controls">
			<input type="text" value="${companyinfo.office.name}" readonly="readonly">
      		<%--<form:input path="office.name" name="office.name" htmlEscape="false" maxlength="50" class="required" readonly="true"/>--%>
      		<span class="help-inline"><font color="red">*</font> </span>
        </div>
      </div>
	  <div class="control-group">
      	<label class="control-label">地址:</label>
      	<div class="controls">
      		<form:input path="address" name="address" htmlEscape="false" maxlength="50" class="required"/>
      		<span class="help-inline"><font color="red">*</font> </span>
        </div>
      </div>
	  <div class="control-group">
      	<label class="control-label">开户行:</label>
      	<div class="controls">
      		<form:input path="bankAccountName" name="bankAccountName" htmlEscape="false" maxlength="50" class="required"/>
      		<span class="help-inline"><font color="red">*</font> </span>
        </div>
      </div>
	  <div class="control-group">
      	<label class="control-label">银行账号:</label>
      	<div class="controls">
      		<form:input path="bankAccountNo" name="bankAccountNo" htmlEscape="false" maxlength="50" class="required"/>
      		<span class="help-inline"><font color="red">*</font> </span>
        </div>
      </div>
	  <div class="control-group">
      	<label class="control-label">公司全程:</label>
      	<div class="controls">
      		<form:input path="companyName" name="companyName" htmlEscape="false" maxlength="50" class="required"/>
      		<span class="help-inline"><font color="red">*</font> </span>
        </div>
      </div>
	  <div class="control-group">
      	<label class="control-label">联系电话:</label>
      	<div class="controls">
      		<form:input path="contactNumber" name="contactNumber" htmlEscape="false" maxlength="50" class="required"/>
      		<span class="help-inline"><font color="red">*</font> </span>
        </div>
      </div>
	  <div class="control-group">
      	<label class="control-label">公司法人:</label>
      	<div class="controls">
      		<form:input path="legalPerson" name="legalPerson" htmlEscape="false" maxlength="50" class="required"/>
      		<span class="help-inline"><font color="red">*</font> </span>
        </div>
      </div>
	<div class="form-actions">
		<shiro:hasPermission name="business:companyinfo:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
		<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
	</div>
</form:form>
</body>
</html>